<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>用户中心_{$web_name}</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="Keywords" content="用户中心" />
		<meta name="Description" content="用户中心" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
		<meta name="format-detection" content="telephone=no">
		<tc_include file="Public:head" />
		<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/User/css/user.css" />
		<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/User/css/user_common.css" />
		<style type="text/css">
			.user-right .tabmenu{margin-bottom: 0;}
			
		</style>
	</head>

	<body>

		<tc_include file="Public:nav" />
		<div class="w990" id="content" style="background: none;">
			<div class="margin-w1210 clearfix">
				<div class="w">
					<div class="breadcrumb clearfix">
						<a href="/" class="index">首页</a> <span class="crumbs-arrow">&gt;</span> <span class="last">用户中心</span></div>
				</div>
				<div class="blank"></div>
				<tc_include file="Public:user_left" />
				<div class="user-right">
					<div class="box">
						<div class="tabmenu">
							<ul class="tab pngFix">
								<li class="first active">用户提现</li>
							</ul>
						</div>
						<div class="alert alert-success">
							<h4>操作提示：</h4>
							<ul>
								<li>您可对已有余额进行提现操作，最低提现金额 <span style="color:red;font-weight: 800;"> {$web_tixian_user} </span>元</li>
							</ul>
						</div>
						<div class="ncm-user-profile">
							<div class="ncm-default-form" id="con_tab_1" style="display: block;">
								<table width="100%" border="0" cellpadding="10" cellspacing="1" bgcolor="#eee">
									<tbody>
										<tr>
											<td width="35%" align="right">用户余额：</td>
											<td width="65%" align="left">
												¥{$userinfo['money']}
											</td>
										</tr>
										<tr>
											<td width="35%" align="right">提现：</td>
											<td width="65%" align="left">
												<input type="number" name="money" value="{$userinfo['money']}" size="25" class="inputbg" style="ime-mode:disabled">
											</td>
										</tr>
										<tr>
											<td colspan="2" align="center">
												<label class="submit-border">
					                          		<input class="act" type="hidden" value="act_edit_profile">
					                          		<input name="submit" type="button" class="main-btn main-btn-large act_edit_profile" value="确认提现">
					                        	</label>
											</td>
										</tr>
									</tbody>
								</table>
								
							</div>
							<div class="tabmenu" style="margin-top: 20px;">
								<input type="button" value="余额记录"class="main-btn common-btn">
							</div>
							<div class="ncm-default-form" id="con_tab_1" style="display: block;">
								<table width="100%" border="0" cellpadding="10" cellspacing="1" bgcolor="#eee">
									<tbody >
										<tr>
											<td width="20%" align="left">类型</td>
											<td width="10%" align="left">金额</td>
											<td width="" align="left">时间</td>
										</tr>
										<foreach name="rs" item="v">
											<php>
												if($v['type']==1){
													$re="+";
												}else{
													$re="-";
												}
												$status=get_withdrawal($v['id']);
											</php>
											<tr>
												<td width="20%" align="left">{$v.other}{$status}</td>
												<td width="10%" align="left">{$re}{$v.money}</td>
												<td width="" align="left">{:date('Y-m-d H:i:s',$v['addtime'])}</td>
											</tr>
										</foreach>
										<empty name="rs">
											<style>
											/*空记录的展示*/
											.tip-box{ width: 1000px; height: 300px; margin: 50px auto 0; text-align: center;}
											.tip-box .tip-icon{ display: block; max-width: 100%; max-height: 100%; margin: 0 auto;}
											.tip-box .tip-text{ line-height: 20px; padding: 10px; font-size: 14px;}
											.tip-box .tip-text p{ height: 40px; line-height: 40px;}

											</style>
											<div class="tip-box">
												<img src="/themes/wnsc/Home/List/images/noresult.png" class="tip-icon">
												<div class="tip-text">没有符合条件的记录</div>
											</div>
										</empty>
									</tbody>
								</table>
								
							</div>
						
							<div class="blank10"></div>
						<div id="pagination" class="page">
							<div class="page-wrap fr">
								<div class="total">共<span id="totalcount">{$count}</span>条</div>
							</div>
							<style>
							.page-num .next {margin-left:0 ;}
							.page-num a{ float: left;text-align: center;border: 1px solid #eee;height: 35px;line-height: 35px;margin-right:4px;}
							.page-num span{float: left; text-align: center; height: 37px; line-height: 37px; width: 37px; margin-right:4px; background: red; color: #fff;}
							</style>
							<div class="page-num fr">
								{$page}
							</div>
						</div>
						</div>
						
						
					</div>
				</div>

			</div>
		</div>
		<div style="clear: both;"></div>

		<tc_include file="Public:footer" />
		<script type="text/javascript">
			$(function(){
				var min_money={$web_tixian_user|default="0"};
				var money={$userinfo.money|default="0"};
				$('.act_edit_profile').click(function(){
					var tx_money=$('input[name=money]').val();
					if(tx_money<=0){
						layer.msg('提现金额必须大于0');
						return;
					}
					var cha_money=tx_money-money;
					if(cha_money>0){
						layer.msg('提现金额必须小于可提金额');
						return;
					}
					if(tx_money<min_money){
						layer.msg('提现金额必须大于最低提现金额');
						return;
					}
					$.post('/user/get_money', {
						tx_money: tx_money,
					}, function(result) {
						if(result==0){
							layer.msg('提现失败');
							return;
						}
						if(result==1){
							layer.msg('提现已提交，等待审核');
							return;
						}
						if(result==2){
							layer.msg('提现金额必须小于可提金额');
							return;
						}
						if(result==3){
							layer.msg('提现金额必须大于最低提现金额');
							return;
						}
					}, "json");
					
				})
			})
		</script>
	</body>

</html>